package com.eightbears.beboy.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.eightbears.beboy.R;
import com.eightbears.beboy.entity.ShopHongBaoEntity;

public class ShopHongBaoAdapter extends BaseQuickAdapter<ShopHongBaoEntity.ShopHongBao, BaseViewHolder> {


    public ShopHongBaoAdapter() {
        super(R.layout.item_shop_hong_bao, null);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, ShopHongBaoEntity.ShopHongBao shopHongBao) {
        String dis = String.format(mContext.getString(R.string.text_price_shop_hongbao), shopHongBao.getLimit_money());
        baseViewHolder.setText(R.id.tv_money, shopHongBao.getMoney())
                .setText(R.id.tv_title, shopHongBao.getShop().getTitle())
                .setText(R.id.tv_dis, dis);
    }
}
